package test

import (
	"context"
	"fmt"
	"lw-shop/goods_service/proto"
)

func TestCreateBanner(goodsClient proto.GoodsClient) {
	rsp, err := goodsClient.CreateBanner(context.Background(), &proto.BannerRequest{
		Index: 4,
		Image: "https://qcloud.dpfile.com/pc/E3Pw0F_QyFDNfCZYQvgRzzJDWc2pInM49c-3gK1XtfwqliLLGSN0FzL6604CTVAS.jpg",
		Url:   "427",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(rsp)
}

func TestUpdateBanner(goodsClient proto.GoodsClient) {
	rsp, err := goodsClient.UpdateBanner(context.Background(), &proto.BannerRequest{
		Id:    7,
		Image: "https://pic.rmb.bdstatic.com/bjh/events/4f70f78d6b957dc359b124ae8ea021c7148.jpeg@h_1280",
		Index: 6,
		Url:   "429",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(rsp)
}
